package org.sabayframework.cluster;

import org.sabayframework.activity.ActivityContext;
import org.sabayframework.activity.impl.StatefulActivity;
import org.sabayframework.channel.Lock;
import org.sabayframework.log.Log;


public class LogActivity extends StatefulActivity<String, String> {

	private String text;
	@Override
	public void input(ActivityContext<String, String> ctx,	Lock<String> inputLock) throws Exception {
		text = inputLock.get(0);
	}

	@Override
	public void process(ActivityContext<String, String> ctx) throws Exception {
		Log.info(text);
	}

	@Override
	public void output(ActivityContext<String, String> ctx,	Lock<String> outputLock) throws Exception {
	}

	@Override
	public int getOutputSize(ActivityContext<String, String> ctx) {
		return 0;
	}

}
